package view;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.view.View;
import model.CameraManager;

/**
 * View for displaying bounds for active camera region
 */
public class BoundingView extends View {

	private Paint paint;
	
    public BoundingView(Context context, AttributeSet attrs) {
        super(context, attrs);
        
        paint = new Paint();
    }


    @Override
    protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);
        
        CameraManager cameraManager = CameraManager.getInstance();
        if (cameraManager != null) 
        {
            paint.setFlags(Paint.ANTI_ALIAS_FLAG);
            paint.setARGB(110, 110, 110, 50);
            Rect boundingRect = cameraManager.getBoundingRectUi(canvas.getWidth(), canvas.getHeight());
            //canvas.drawRect(boundingRect, paint);
        }
    }
}
